package com.sikaryofficial.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sikaryofficial.backend.domain.dto.req.EvaluateReplyListReq;
import com.sikaryofficial.backend.domain.dto.resp.EvaluateReplyDTO;
import com.sikaryofficial.backend.domain.entity.BrandTasteEvaluateReply;
import com.sikaryofficial.backend.domain.vo.EvaluateReplyCount;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 品牌口味评价回复Mapper接口
 *
 * @author qinjinyuan
 * @date 2023-11-03
 */
public interface BrandTasteEvaluateReplyMapper extends BaseMapper<BrandTasteEvaluateReply> {
    /**
     * 根据评价id查询回复数量
     *
     * @param evaluateIds 评价ids
     * @return 回复数量
     */
    List<EvaluateReplyCount> countByEvaluateId(@Param("evaluateIds") List<Long> evaluateIds);

    /**
     * 评价回复列表
     * @param customerPage
     * @param req
     * @return
     */
    IPage<EvaluateReplyDTO> replyList(Page<EvaluateReplyDTO> customerPage,@Param("req") EvaluateReplyListReq req,@Param("userId") Long userId);
}
